﻿Imports StartFrame.Web

Public Class _Default
    Inherits BasePage


    Private Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim iHTML As String = ""
        If Not Request.QueryString("idpedido") Is Nothing Then
            iHTML = String.Format("Ext.onReady(function () {{login();}});function DespuesLogueo() {{mostrarPedido({0});}}", Request.QueryString("idpedido"))
        End If
        If Not Request.QueryString("idarticulo") Is Nothing Then
            iHTML = String.Format("Ext.onReady(function () {{login();}});function DespuesLogueo() {{mostrarArticulo({0});}}", Request.QueryString("idarticulo"))
        End If
        If Not Request.QueryString("idprecio") Is Nothing Then
            iHTML = String.Format("Ext.onReady(function () {{login();}});function DespuesLogueo() {{mostrarPrecio({0});}}", Request.QueryString("idprecio"))
        End If
        If Not Request.QueryString("idhistorico") Is Nothing Then
            iHTML = String.Format("Ext.onReady(function () {{login();}});function DespuesLogueo() {{mostrarHistorico({0});}}", Request.QueryString("idhistorico"))
        End If
        If Not String.IsNullOrWhiteSpace(iHTML) Then
            Dim htmlGenericControl As HtmlGenericControl
            htmlGenericControl = New HtmlGenericControl("script")
            htmlGenericControl.Attributes.Add("type", "text/javascript")
            htmlGenericControl.InnerHtml = iHTML
            Me.Page.Header.Controls.Add(htmlGenericControl)
        End If
    End Sub
End Class